﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" CodeBehind="New.aspx.cs" Inherits="MVCClubSite.Web.Views.Announcements.New" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<div class="contentblock">
        <h2>
            New Annoucement</h2>
            
            <%= Html.ValidationSummary() %>
            
        <% using (Html.BeginForm("Create", "Announcements", FormMethod.Post))
           { %>
        <table border="0" cellpadding="2" cellspacing="0">
            <tr>
                <td>
                    <%= Html.Label("Title", "Title:")%>
                </td>
                <td>
                    <%= Html.TextBox("Title", "", (object)new { @size = "80" }) %>
                    <%= Html.ValidationMessage("title") %>
                </td>
            </tr>
            <tr>
                <td valign="top">
                    <%= Html.Label("Description", "Description:") %>
                </td>
                <td>
                    <%= Html.TextArea("Description", "", 6, 80, null)%>
                    <%= Html.ValidationMessage("Description")%>
                </td>
            </tr>
            <tr>
                <td>
                    <%= Html.Label("announcementDate", "Announcement Date:") %>
                </td>
                <td>
                    <%= Html.TextBox("announcementDate", DateTime.Now.ToShortDateString(), (object)new { @size = "10" })%>
                    <%= Ajax.Calendar("announcementDate")%>
                    <%= Html.ValidationMessage("announcementDate")%>
                </td>
            </tr>
            <tr>
                <td>
                    Photo Album:
                </td>
                <td>
                    <select size="5" name="albumID" id="albumID">
                        <option value="0" selected="selected">No Album Selected</option>
                        <% foreach (Album a in ViewData.Model.Albums)
                           { %>
                        <%= "<option value='" + a.ID + "'>" + a.Title + "</option>" %>
                        <%} %>
                    </select>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                    <input type="submit" value="Save" id="saveButton" />
                </td>
            </tr>
        </table>
        <% } %>
    </div>

    <script type="text/javascript" src="<%=AppHelper.JavascriptUrl("tinymce/tiny_mce.js") %>"></script>

    <script type="text/javascript" src="<%=AppHelper.JavascriptUrl("tinymce/advanced_config.js") %>"></script>

</asp:Content>
